package com.sky.service;

import com.sky.dto.*;
import com.sky.entity.Orders;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;
import org.springframework.core.annotation.Order;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface OrderService {
    Integer saveOrder(Orders orders);
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    PageResult queryPageInfo(OrdersPageQueryDTO ordersPageQueryDTO);

    OrderVO getOrderDetail(Long id);

    void userCancelById(Long id) throws Exception;

    void repetition(Long id);

    void orderCancel(OrdersCancelDTO ordersCancelDTO);

    OrderStatisticsVO getOrderStatistics();

    Orders getOrder(Long id);

    void orderComplete(Long id);

    void rejection(OrdersRejectionDTO ordersRejectionDTO);

    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    void delivery(Long id);

    void reminder(Long id);

    void exportExcelData(HttpServletResponse response) throws IOException;
}
